#define _CRT_SECURE_NO_WARNINGS 1
int minNumberInRotateArray(int* rotateArray, int rotateArrayLen) {
    // write code here
    int right = rotateArrayLen - 1;
    int left = 0;

    while (left < right)
    {
        int num = left + (right - left) / 2;
        if (rotateArray[num] < rotateArray[right])
        {
            right = num;
        }
        else if (rotateArray[num] > rotateArray[right])
        {
            left = num + 1;
        }
        else
        {
            right -= 1;
        }

    }
    return rotateArray[left];

}